<script setup lang="ts">
import { useCounterStore } from './stores/count'
import { storeToRefs} from 'pinia'
const store = useCounterStore()
const {count, doubleCount} = storeToRefs(store)
</script>

<template>
  <div>
    App
    <p>{{count}}</p>
    <p>{{ doubleCount}}</p>
    <button @click="store.update()">count++</button>
    <button @click="store.asyncUpdate()">async count++</button>
  </div>
</template>

<style lang="scss" scoped></style>
